<!--conf
<sample in_favorites="false">
               <product version="1.4" edition="std"/>
                       <modifications>
                               <modified date="070101"/>
                       </modifications>
               </sample>
 --> 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
	<title>Alternative styles for even/uneven rows</title>
	
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" type="text/css" href="../../../codebase/dhtmlx.css"/>
	<script src="../../../codebase/dhtmlx.js"></script>
<style>
	.even{
        background-color:#E6E6FA;
    }
    .uneven{
        background-color:#F0F8FF;
    }
</style>
</head>

<body>
	
	<h1>Alternative styles for even/uneven rows</h1>
	<p>You are allowed to set alternative color styles for even/uneven rows in your grid using enableAlterCss method.</p>

	
	<table width="600px">
  <tr>
			<td>
				<div id="gridbox" style="width:100%;height:270px;background-color:white;"></div>
			</td>
		</tr>
		<tr>
			<td>
				<a href="javascript:void(0)" onClick="mygrid.addRow((new Date()).valueOf(),[0,'','','',false,'na',false,''],mygrid.getRowIndex(mygrid.getSelectedId()))">Add row</a><br>
				<a href="javascript:void(0)" onClick="mygrid.deleteSelectedItem()">Remove Selected Row</a>
            </td>
		</tr>
	</table>
<br>

<br>
<script>
	mygrid = new dhtmlXGridObject('gridbox');
	mygrid.setImagePath("../../../codebase/imgs/");
	mygrid.setHeader("Sales,Book Title,Author,Price,In Store,Shipping,Bestseller,Date of Publication");
	mygrid.setInitWidths("50,150,100,80,80,80,80,200")
	mygrid.setColAlign("right,left,left,right,center,left,center,center")
	mygrid.setColTypes("dyn,ed,ed,price,ch,co,ra,ro");
    mygrid.getCombo(5).put(2,2);
	mygrid.setColSorting("int,str,str,int,str,str,str,date")
	mygrid.init();
	mygrid.setSkin("dhx_skyblue")
	mygrid.enableAlterCss("even","uneven");
	mygrid.loadXML("../common/grid.xml");
</script>

</body>
</html>
